//
//  Cinema.m
//  ShowTimeApp
//
//  Created by Ruby on 11/7/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "Cinema.h"
#import "ShowTime.h"
#import "TicketInfo.h"


@implementation Cinema
@dynamic GroupName;
@dynamic Description;
@dynamic Email;
@dynamic Fax;
@dynamic ID;
@dynamic ImageUrl;
@dynamic Name;
@dynamic Tel;
@dynamic Address;
@dynamic Website;
@dynamic City;
@dynamic Cinema_Ticket;
@dynamic Cinema_ShowTime;

- (void)addCinema_TicketObject:(TicketInfo *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Cinema_Ticket"] addObject:value];
    [self didChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeCinema_TicketObject:(TicketInfo *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Cinema_Ticket"] removeObject:value];
    [self didChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addCinema_Ticket:(NSSet *)value {    
    [self willChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Cinema_Ticket"] unionSet:value];
    [self didChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeCinema_Ticket:(NSSet *)value {
    [self willChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Cinema_Ticket"] minusSet:value];
    [self didChangeValueForKey:@"Cinema_Ticket" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}


- (void)addCinema_ShowTimeObject:(ShowTime *)value {    
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Cinema_ShowTime"] addObject:value];
    [self didChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)removeCinema_ShowTimeObject:(ShowTime *)value {
    NSSet *changedObjects = [[NSSet alloc] initWithObjects:&value count:1];
    [self willChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [[self primitiveValueForKey:@"Cinema_ShowTime"] removeObject:value];
    [self didChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:changedObjects];
    [changedObjects release];
}

- (void)addCinema_ShowTime:(NSSet *)value {    
    [self willChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Cinema_ShowTime"] unionSet:value];
    [self didChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueUnionSetMutation usingObjects:value];
}

- (void)removeCinema_ShowTime:(NSSet *)value {
    [self willChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
    [[self primitiveValueForKey:@"Cinema_ShowTime"] minusSet:value];
    [self didChangeValueForKey:@"Cinema_ShowTime" withSetMutation:NSKeyValueMinusSetMutation usingObjects:value];
}


@end
